// 倒入api 将所有接口统一
import axios from './api'

// 文章列表
export const notifyList = data => {
  return axios({
    url: '/articles/alist',
    method: 'post',
    data
  })
}

// 文章详情
export const notifyDetails = data => {
  return axios({
    url: '/articles/info',
    method: 'post',
    data
  })
}
// 商品列表
export const getSubscribeConf = data => {
  return axios({
    url: '/subscribe/getSubscribeConf',
    method: 'post',
    data
  })
}
// 订单列表
export const subscribeA = data => {
  return axios({
    url: '/subscribe/subscribe',
    method: 'post',
    data
  })
}

export const subscribeTime = data => {
  return axios({
    url: '/subscribe/subscribeTime',
    method: 'post',
    data
  })
}

// 用户转账
export const userzz = data => {
  return axios({
    url: '/user/userzz',
    method: 'get',
    params: data
  })
}

// 商品列表
export const goodsList = data => {
  return axios({
    url: '/goods/goodsList',
    method: 'post',
    data
  })
}
// 商品详情
export const goodsDetails = data => {
  return axios({
    url: '/goods/goodsDetail',
    method: 'post',
    data
  })
}
// 商品详情
export const subscribe = data => {
  return axios({
    url: '/goods/subscribe',
    method: 'post',
    data
  })
}
// 注册
export const register = data => {
  return axios({
    url: '/complain/register',
    method: 'post',
    data
  })
}

// 登录
export const login = data => {
  return axios({
    //url: '/login/login',
    url: '/complain/login',
    method: 'post',
    data
  })
}

// 登录
export const loginVersion = data => {
  return axios({
    url: '/index/loginVersion',
    method: 'post',
    data
  })
}

export const getRecharge = data => {
  return axios({
    url: '/index/rechargeOff',
    method: 'post',
    data
  })
}

export const isSign = data => {
  return axios({
    url: '/index/isSign',
    method: 'post',
    data
  })
}

export const isName = data => {
  return axios({
    url: '/index/isName',
    method: 'post',
    data
  })
}

export const downOff = data => {
  return axios({
    url: '/index/downOff',
    method: 'post',
    data
  })
}

export const draw_off = data => {
  return axios({
    url: '/index/draw_off',
    method: 'post',
    data
  })
}

// 退出登录
export const loginOut = data => {
  return axios({
    url: '/user/logout',
    method: 'post',
    data
  })
}

// 获取验证码
export const verificationCode = data => {
  return axios({
    url: '/common/sendSms',
    method: 'post',
    data
  })
}
// 新增收货地址
export const addAddress = data => {
  return axios({
    url: '/user/addaddress',
    method: 'post',
    data
  })
}

export const isShiming = data => {
  return axios({
    url: '/user/isShiming',
    method: 'post',
    data
  })
}

export const shiming = data => {
  return axios({
    url: '/user/shiming',
    method: 'post',
    data
  })
}

// 获取省市区
export const regionList = data => {
  return axios({
    url: '/common/area',
    method: 'post',
    data
  })
}

// 收款设置微信和支付宝
export const paySething = data => {
  return axios({
    url: '/user/setPay',
    method: 'post',
    data
  })
}

// 收款信息
export const paySetingInfo = data => {
  return axios({
    url: '/user/getpay',
    method: 'post',
    data
  })
}

// 收款设置微信和支付宝
export const homeData = data => {
  return axios({
    url: '/goods/goodsCatList',
    method: 'post',
    data
  })
}

// 首页画家列表
export const articleData = data => {
  return axios({
    url: '/articles/gethua',
    method: 'get',
    data
  })
}

// 首页画家列表
export const goodsCatData = data => {
  return axios({
    url: '/shop/goodscate',
    method: 'get',
    data
  })
}

// 删除地址
export const deleteAddress = data => {
  return axios({
    url: '/user/deladdress',
    method: 'post',
    data
  })
}

// 编辑地址
export const editAddress = data => {
  return axios({
    url: '/user/editaddress',
    method: 'post',
    data
  })
}

// 查询地址列表
export const addressList = data => {
  return axios({
    url: '/user/addresslist',
    method: 'post',
    data
  })
}

// 查询默认地址
export const defaultAddress = data => {
  return axios({
    url: '/user/getaddress',
    method: 'post',
    data
  })
}
// 设置默认收货地址
export const setDefaultAddress = data => {
  return axios({
    url: '/user/setDefaultAddress',
    method: 'post',
    data
  })
}

// 查询订单
export const queryOrder = data => {
  return axios({
    url: '/user/getOrder',
    method: 'post',
    data
  })
}

export const getNotice = data => {
  return axios({
    url: '/index/getNotice',
    method: 'post',
    data
  })
}

// 创建订单
export const createOrder = data => {
  return axios({
    url: '/order/submitOrder',
    method: 'get',
    params:data
  })
}

// 创建订单获取的数据
export const getpipeiorderdata = data => {
  return axios({
    url: '/order/index',
    method: 'get',
    params:data
  })
}


// 上月签到列表
export const signLists = data => {
  return axios({
    url: '/user/getBuyorderQdLists',
    method: 'post',
    data
  })
}

// 查询用户手机号本月签到列表
export const signQueryLists = data => {
  return axios({
    url: '/user/getQueryBuyorderQdList',
    method: 'post',
    data
  })
}

// 查询用户手机号上月签到列表
export const signQueryList = data => {
  return axios({
    url: '/user/getQueryBuyorderQdLists',
    method: 'post',
    data
  })
}

// 本月签到列表
export const signList = data => {
  return axios({
    url: '/user/getBuyorderQdList',
    method: 'post',
    data
  })
}

// 订单列表
export const orderList = data => {
  return axios({
    url: '/order/orderPage',
    method: 'get',
    params:data
  })
}

// 订单列表
export const orderDetail = data => {
  return axios({
    url: '/order/orderDetail',
    method: 'get',
    params:data
  })
}

export const orderSubmit = data => {
  return axios({
    url: '/order/orderSubmit',
    method: 'post',
    data
  })
}

// 取消订单
export const cancelOrder = data => {
  return axios({
    url: '/user/cancelOrder',
    method: 'post',
    data
  })
}
// 分享奖励
export const shareReward = data => {
  return axios({
    url: '/user/reward',
    method: 'post',
    data
  })
}

// 提现历史
export const drawHistory = data => {
  return axios({
    url: '/user/drawList',
    method: 'post',
    data
  })
}
// 提现历史
export const rechargeHistory = data => {
  return axios({
    url: '/user/rechargeList',
    method: 'post',
    data
  })
}
// 提现
export const draw = data => {
  return axios({
    url: '/ctrl/submitDeposit',
    method: 'post',
    data
  })
}

// 充值
export const recharge = data => {
  return axios({
    url: '/ctrl/submitRecharge',
    method: 'post',
    data
  })
}

export const rechargeline = data => {
  return axios({
    url: '/pay/vdfpay',
    method: 'post',
    data
  })
}

export const rechargelinenew = data => {
  return axios({
    url: '/pay/starspay',
    method: 'post',
    data
  })
}

export const rechargelinesoonpay = data => {
  return axios({
    url: '/pay/soonpay',
    method: 'post',
    data
  })
}

export const rechargelinerupiah = data => {
  return axios({
    url: '/pay/toppay',
    method: 'post',
    data
  })
}

// 卖单列表
export const sellOrderList = data => {
  return axios({
    url: '/user/sellOrderList',
    method: 'post',
    data
  })
}

// 转售
export const sellOrder = data => {
  return axios({
    url: '/user/resell',
    method: 'post',
    data
  })
}

// 发货
export const handleSend = data => {
  return axios({
    url: '/user/handlesend',
    method: 'post',
    data
  })
}

// 确认收款
export const completeOrder = data => {
  return axios({
    url: '/user/completeOrder',
    method: 'post',
    data
  })
}

// 获取用户收款信息
export const getUserPayInfo = data => {
  return axios({
    url: '/common/getUserPay',
    method: 'post',
    data
  })
}

// 获取用户收款信息
export const getSysPay = data => {
  return axios({
    url: '/common/getSysPay',
    method: 'post',
    data
  })
}

// 上传付款截图
export const payPic = data => {
  return axios({
    url: '/user/payOrder',
    method: 'post',
    data
  })
}

// 获取流水详情
export const getSaless = data => {
  return axios({
    url: '/user/getSales',
    method: 'post',
    data
  })
}

export const getBanner = data => {
  return axios({
    url: '/index/banner',
    method: 'post',
    data
  })
}
export const getBanner1 = data => {
  return axios({
    url: '/index/banner1',
    method: 'get',
    data
  })
}
export const getBanner2 = data => {
  return axios({
    url: '/index/banner2',
    method: 'get',
    data
  })
}
// 获取好友返佣
export const getFriends = data => {
  return axios({
    url: '/ctrl/junior',
    method: 'get',
    params: data
  })
}
// 获取后台充值信息
export const getReahargeInfo = data => {
  return axios({
    url: '/user/getRecharge',
    method: 'get',
    data
  })
}
// 提交充值截图
export const payRecharge = data => {
  return axios({
    url: '/user/payRecharge',
    method: 'post',
    data
  })
}
// 获取好友返佣
export const getFriendOrder = data => {
  return axios({
    url: '/user/friendOrderList',
    method: 'post',
    data
  })
}

export const getstar = data => {
  return axios({
    url: '/user/getstar',
    method: 'post',
    data
  })
}

export const getqq = data => {
  return axios({
    url: '/index/getqq',
    method: 'post',
    data
  })
}
// 获取图形验证码
export const getVerify = data => {
  return axios({
    url: 'login/getVerify/rnd/11490',
    method: 'get',
    data
  })
}

// 获取短信验证码
export const getSms = data => {
  return axios({
    url: 'login/getsms',
    method: 'post',
    data
  })
}
export const getSms1 = data => {
  return axios({
    url: 'login/getSms1',
    method: 'post',
    data
  })
}
export const mySubscribe = data => {
  return axios({
    url: 'subscribe/mySubscribe',
    method: 'post',
    data
  })
}
export const getInvite = data => {
  return axios({
    url: 'user/getInvite',
    method: 'post',
    data
  })
}

// 卖单列表
export const MyGoodsList = data => {
  return axios({
    url: '/goods/getMygoods',
    method: 'post',
    data
  })
}

// 文章列表
export const isPermissions = data => {
  return axios({
    url: '/studio/isStudio',
    method: 'post',
    data
  })
}
export const studioData = data => {
  return axios({
    url: '/studio/studioData',
    method: 'post',
    data
  })
}
export const zdyy = data => {
  return axios({
    url: '/studio/zdyy',
    method: 'post',
    data
  })
}

export const updateAgreement = data => {
  return axios({
    url: '/studio/updateAgreement',
    method: 'post',
    data
  })
}

export const updateMatching = data => {
  return axios({
    url: '/studio/updateMatching',
    method: 'post',
    data
  })
}

export const updateShowPhone = data => {
  return axios({
    url: '/studio/updateShowPhone',
    method: 'post',
    data
  })
}

export const isAgreement = data => {
  return axios({
    url: '/studio/isAgreement',
    method: 'post',
    data
  })
}
export const studioList = (code, onlineStatus, is_cf = 0, is_fc = 0) => {
  return axios({
    url: '/studio/studioList?code=' + code + '&onlineStatus=' + onlineStatus + '&is_cf=' + is_cf + '&is_fc=' + is_fc,
    method: 'get'
  })
}
export const upShopType = data => {
  return axios({
    url: '/studio/upShopType',
    method: 'post',
    data
  })
}
export const intervalTime = data => {
  return axios({
    url: '/studio/intervalTime',
    method: 'post',
    data
  })
}
export const chaifen = data => {
  return axios({
    url: '/studio/chaifen',
    method: 'post',
    data
  })
}
export const searchStudio = data => {
  return axios({
    url: '/studio/searchStudio',
    method: 'post',
    data
  })
}
export const searchUser = data => {
  return axios({
    url: '/studio/searchUser',
    method: 'post',
    data
  })
}
export const getAudit = data => {
  return axios({
    url: '/studio/getAudit',
    method: 'post',
    data
  })
}
export const sucAudit = data => {
  return axios({
    url: '/studio/sucAudit',
    method: 'post',
    data
  })
}
export const faiAudit = data => {
  return axios({
    url: '/studio/faiAudit',
    method: 'post',
    data
  })
}
export const queryStudio = data => {
  return axios({
    url: '/studio/queryStudio',
    method: 'post',
    data
  })
}
export const zhuanchang = data => {
  return axios({
    url: '/studio/zhuanchang',
    method: 'post',
    data
  })
}
export const zhipai = data => {
  return axios({
    url: '/studio/zhipai',
    method: 'post',
    data
  })
}
export const subscribeList = data => {
  return axios({
    url: '/studio/subscribeList',
    method: 'post',
    data
  })
}
export const zcList = data => {
  return axios({
    url: '/studio/zcList',
    method: 'post',
    data
  })
}
export const agreeMove = data => {
  return axios({
    url: '/studio/agreeMove',
    method: 'post',
    data
  })
}
export const refuseMove = data => {
  return axios({
    url: '/studio/refuseMove',
    method: 'post',
    data
  })
}
export const staticOrder = data => {
  return axios({
    url: '/studio/staticOrder',
    method: 'post',
    data
  })
}
export const drawList = data => {
  return axios({
    url: '/studio/drawList',
    method: 'post',
    data
  })
}
export const drawS = data => {
  return axios({
    url: '/studio/drawS',
    method: 'post',
    data
  })
}
export const getStudioOrder = data => {
  return axios({
    url: '/studio/getStudioOrder',
    method: 'post',
    data
  })
}
export const reShell = data => {
  return axios({
    url: '/studio/reShell',
    method: 'post',
    data
  })
}
export const allReshell = data => {
  return axios({
    url: '/studio/allReshell',
    method: 'post',
    data
  })
}
export const changePassword = data => {
  return axios({
    url: '/ctrl/set_pwd',
    method: 'post',
    data
  })
}
export const changeTxPassword = data => {
  return axios({
    url: '/ctrl/set_depositpwd',
    method: 'post',
    data
  })
}
export const findPass = data => {
  return axios({
    url: '/login/findPass',
    method: 'post',
    data
  })
}
export const payPass = data => {
  return axios({
    url: '/user/payPass',
    method: 'post',
    data
  })
}
export const getStudio = data => {
  return axios({
    url: '/studio/getStudio',
    method: 'post',
    data
  })
}
export const getStudioName = data => {
  return axios({
    url: '/studio/getStudioName',
    method: 'post',
    data
  })
}
export const changeStudio = data => {
  return axios({
    url: '/studio/changeStudio',
    method: 'post',
    data
  })
}
export const getOrderAudit = data => {
  return axios({
    url: '/studio/getOrderAudit',
    method: 'post',
    data
  })
}
export const cancleOrder = data => {
  return axios({
    url: '/studio/cancleOrder',
    method: 'post',
    data
  })
}
export const sucOrder = data => {
  return axios({
    url: '/studio/sucOrder',
    method: 'post',
    data
  })
}
export const failOrder = data => {
  return axios({
    url: '/studio/failOrder',
    method: 'post',
    data
  })
}
// 转账列表
export const getzzlog = data => {
  return axios({
    url: '/user/getzzlog',
    method: 'get',
    params: data
  })
}
// 转账列表
export const getuserzzlog = data => {
  return axios({
    url: '/user/getuserzzlog',
    method: 'get',
    params: data
  })
}
export const getDrawList = data => {
  return axios({
    url: '/user/getDrawList',
    method: 'get',
    params: data
  })
}
export const getyylog = data => {
  return axios({
    url: '/user/getyylog',
    method: 'get',
    params: data
  })
}
// 获取好友返佣
export const getFriendOrders = data => {
  return axios({
    url: '/user/friendOrdersList',
    method: 'post',
    data
  })
}
export const changeUserName = data => {
  return axios({
    url: '/my/edit_username',
    method: 'post',
    data
  })
}

export const changeUserblank = data => {
  return axios({
    url: '/ctrl/saveBankinfo',
    //url: '/my/bind_bank',
    method: 'post',
    data
  })
}

export const changeUservodafone = data => {
  return axios({
    url: '/my/saveVdfwallet',
    method: 'post',
    data
  })
}

export const changeUserruss = data => {
  return axios({
    url: '/my/saveRusswallet',
    method: 'post',
    data
  })
}

export const changeUserrusss = data => {
  return axios({
    url: '/my/saveIdrwallet',
    method: 'post',
    data
  })
}

export const studioStatic = data => {
  return axios({
    url: '/studio/studioStatic',
    method: 'post',
    data
  })
}
export const subList = data => {
  return axios({
    url: '/subscribe/subList',
    method: 'post',
    data
  })
}
export const doSub = data => {
  return axios({
    url: '/subscribe/doSub',
    method: 'post',
    data
  })
}
export const branchStudio = data => {
  return axios({
    url: '/studio/branchStudio',
    method: 'post',
    data
  })
}
export const searchGood = data => {
  return axios({
    url: '/studio/searchGood',
    method: 'post',
    data
  })
}
export const registerStudio = data => {
  return axios({
    url: '/studio/registerStudio',
    method: 'post',
    data
  })
}
export const read = data => {
  return axios({
    url: '/index/read',
    method: 'post',
    data
  })
}
export const company = data => {
  return axios({
    url: '/index/company',
    method: 'post',
    data
  })
}
export const pass_off = data => {
  return axios({
    url: '/index/pass_off',
    method: 'post',
    data
  })
}
export const order_off = data => {
  return axios({
    url: '/index/order_off',
    method: 'post',
    data
  })
}
export const pic_my = data => {
  return axios({
    url: '/index/pic_my',
    method: 'post',
    data
  })
}

export const submitData = data => {
  return axios({
    url: '/complain/submitData',
    method: 'post',
    data
  })
}

export const getRecord = data => {
  return axios({
    url: '/complain/getRecord',
    method: 'get',
    params: data
  })
}


export const myupload = data => {
  return axios({
    url: '/my/myuplod',
    method: 'post',
    data
  })
}

export const resell_off = data => {
  return axios({
    url: '/index/resell_off',
    method: 'post',
    data
  })
}
export const getsmsS = data => {
  return axios({
    url: '/index/sms_off',
    method: 'post',
    data
  })
}
export const getMianze = data => {
  return axios({
    url: '/articles/getMianze',
    method: 'post',
    data
  })
}
export const getBuy = data => {
  return axios({
    url: '/articles/getBuy',
    method: 'post',
    data
  })
}
export const delOrderB = data => {
  return axios({
    url: '/user/delOrderB',
    method: 'post',
    data
  })
}
export const delOrderS = data => {
  return axios({
    url: '/user/delOrderS',
    method: 'post',
    data
  })
}
export const getShoukuanma = data => {
  return axios({
    url: '/user/getShoukuanma',
    method: 'post',
    data
  })
}

export const withdrawallist = data => {
  return axios({
    url: '/ctrl/rechargePage',
    method: 'get',
    params: data
  })
}

export const withdrawalslist = data => {
  return axios({
    url: '/ctrl/depositPage',
    method: 'get',
    params: data
  })
}

export const getaccountlist = data => {
  return axios({
    url: '/my/caiwuList',
    method: 'get',
    params: data
  })
}

export const getuserinfo = data => {
  return axios({
    url: '/my/userinfo',
    method: 'get',
    params: data
  })
}

export const saveuserhead = data => {
  return axios({
    url: '/my/edit_headimg',
    method: 'post',
    data
  })
}

export const getuserblank = data => {
  return axios({
    url: '/ctrl/getBankinfo',
    method: 'get',
    params: data
  })
}

export const getuservodafone = data => {
  return axios({
    url: '/my/get_vdfwallet',
    method: 'get',
    params: data
  })
}

export const getrusswallet = data => {
  return axios({
    url: '/my/get_russwallet',
    method: 'get',
    params: data
  })
}

export const getrupiahwallet = data => {
  return axios({
    url: '/my/get_idrwallet',
    method: 'get',
    params: data
  })
}

export const getsysconfig = data => {
  return axios({
    url: '/ctrl/dealControl',
    method: 'get',
    params: data
  })
}

export const getqrcode = data => {
  return axios({
    url: '/my/qrcode',
    method: 'get',
    params: data
  })
}


/*
post 方式：签到/api/my/userSign
get方式：签到记录/api/my/userSignRecord
*/
//获取签到记录
export const userSignRecord = data => {
    return axios({
        url: '/my/userSignRecord',
        method: 'get',
        params: data
    })
}

//签到
export const userSignClick = data => {
    return axios({
        url: '/my/userSign',
        method: 'post',
        params: data
    })
}

// 默认全部倒出
export default {
  withdrawallist,
    userSignRecord,
    userSignClick,
  withdrawalslist,
  getaccountlist,
  getuserinfo,
  saveuserhead,
  getuserblank,
  getuservodafone,
  getrusswallet,
  getrupiahwallet,
  changeUserblank,
  changeUservodafone,
  changeUserruss,
  changeUserrusss,
  orderDetail,
  orderSubmit,
  getsysconfig,
  getqrcode,

  branchStudio,
  intervalTime,
  studioList,
  isAgreement,
  updateAgreement,
  studioData,
  // 权限
  isPermissions,
  getInvite,
  // 订单返佣
  getFriendOrder,
  // banner图
  getBanner,
  getBanner1,
  getBanner2,
  // getReachinfo
  getReahargeInfo,
  //  获取好友
  getFriends,
  // 获取流水
  getSaless,
  // 文章列表
  notifyList,
  // 文章详情
  notifyDetails,
  // 商品列表
  goodsList,
  // 商品详情
  goodsDetails,
  subscribe,
  // 注册
  register,
  // 登录
  login,
  // 退出登录
  loginOut,
  // 获取验证码
  verificationCode,
  // 新增收货地址
  addAddress,
  // 获取省市区
  regionList,
  // 收款设置
  paySething,
  // 收款信息
  paySetingInfo,
  // 首页数据
  homeData,
  // 画家数据
  articleData,
  // 首页商城导航
  goodsCatData,
  // 查询默认地址
  defaultAddress,
  // 设置默认收货地址
  setDefaultAddress,
  // 删除地址
  deleteAddress,
  // 编辑地址
  editAddress,
  // 查询地址列表
  addressList,
  // 创建订单
  createOrder,
  // 查询订单
  queryOrder,
  //本月签到列表
  signList,
  //上月签到列表
  signLists,
  //查询手机用户本月签到列表
  signQueryLists,
  //查询手机用户上月签到列表
  signQueryList,
  // 订单列表
  orderList,
  // 取消订单
  cancelOrder,
  // 分享奖励
  shareReward,
  // 提现历史
  drawHistory,
  // 提现
  draw,
  // 充值
  recharge,
  rechargeline,
  rechargelinenew,
  rechargelinesoonpay,
  rechargelinerupiah,
  // 付款码
  payRecharge,
  // 卖单列表
  sellOrderList,
  // 转售
  sellOrder,
  // 确认收款
  completeOrder,
  // 获取用户收款信息
  getUserPayInfo,
  // 上传付款截图
  payPic,
  // 申请发货
  handleSend,
  getstar,
  getqq,
  // 获取图形验证码
  getVerify,
  getSms,
  getSubscribeConf,
  subscribeA,
  mySubscribe,
  getNotice,
  MyGoodsList,
  subscribeTime,
  chaifen,
  getAudit,
  sucAudit,
  faiAudit,
  queryStudio,
  zhuanchang,
  subscribeList,
  zcList,
  agreeMove,
  refuseMove,
  staticOrder,
  drawList,
  drawS,
  changePassword,
  changeTxPassword,

  findPass,
  getSms1,
  getStudio,
  changeStudio,
  getOrderAudit,
  failOrder,
  sucOrder,
  cancleOrder,
  getzzlog,
  getyylog,
  userzz,
  getDrawList,
  getFriendOrders,
  payPass,
  changeUserName,
  getuserzzlog,
  loginVersion,
  updateShowPhone,
  getRecharge,
  getSysPay,
  studioStatic,
  updateMatching,
  subList,
  doSub,
  downOff,
  rechargeHistory,
  searchStudio,
  registerStudio,
  searchUser,
  zhipai,
  zdyy,
  isSign,
  isName,
  isShiming,
  shiming,
  read,
  getStudioName,
  getMianze,
  company,
  getBuy,
  pic_my,
  myupload,
  submitData,
  getRecord,
  pass_off,
  delOrderS,
  delOrderB,
  order_off,
  resell_off,
  getShoukuanma,
  searchGood,
  getStudioOrder,
  reShell,
  allReshell,
  draw_off,
  getsmsS,
  getpipeiorderdata
}
